package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import flc.ast.R;
import flc.ast.activity.Game1Activity;
import flc.ast.activity.Game2Activity;
import flc.ast.databinding.FragmentGuessBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link GuessFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class GuessFragment extends BaseNoModelFragment<FragmentGuessBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_guess;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(getActivity(), mDataBinding.event1Container);
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);

        mDataBinding.ivGame1.setOnClickListener(this);
        mDataBinding.ivGame2.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.ivGame1://看图猜剧名
                startActivity(Game1Activity.class);
                break;
            case R.id.ivGame2://看图猜角色
                startActivity(Game2Activity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}